home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra_2 / flmgmtcl.zip / FILELMT.H < prev    next >
C/C++ Source or Header  |  1995-11-02  |  4KB  |  106 lines

  1. // ==========================================================================
  2. //                         File System Limit Specification 
  3. // ==========================================================================
  4.  
  5. // Header file : filelmt.h
  6.  
  7. // Source : R.Mortelmans
  8. // Date :    10th May 1995
  9.                           
  10. // //////////////////////////////////////////////////////////////////////////
  11.  
  12. // Desciption :         
  13. //        This file defines several file system limits
  14.  
  15. // Remark:
  16.  
  17. // Prerequisites (necessary conditions):
  18. //        
  19.  
  20.  
  21. /////////////////////////////////////////////////////////////////////////////
  22. #ifndef __FILELMT_H__
  23. #define __FILELMT_H__             
  24.  
  25. // ... The maximum number of characters that a full file name
  26. //     (base name and full stop and extender) may use,
  27. //     EXCLUDING  the zero-terminator
  28. //     The is also the maximum length for a directory name
  29. //        FAT : 12, VFAT : 254, HPFS : 254, NTFS : 255 
  30. #ifdef WIN32
  31. #define MAX_FILE_NAME_LENGTH    255
  32. #else
  33. // ... WIN16 is always FAT
  34. #define MAX_FILE_NAME_LENGTH    12
  35. #endif
  36.  
  37. // ... The maximum number of characters that a full path specification
  38. //     may use, EXCLUDING the zero-terminator
  39. //        FAT : 66, VFAT : 259, HPFS : 254, NTFS : 255 
  40. #ifdef WIN32
  41. #define MAX_PATH_NAME_LENGTH    259
  42. #else
  43. // ... WIN16 is always FAT
  44. #define MAX_PATH_NAME_LENGTH    66
  45. #endif
  46.  
  47. // .... Characters that are always invalid for directory or file names
  48. //        * characters in the (decimal) range 0 through 31
  49. //        * less-than (<), geater-than (>), double quotation mark (")
  50. //        pipe (|)
  51. //        * Drive separator : colon(:)
  52. //        * Directory separators : slash (/) and back slash (\)
  53. //      * Wild characters : question mark (?) and asterisk (*)
  54. //      Different file systems add extra limitations
  55. //        FAT : left-square-bracket ([), right-square-bracket (]),
  56. //              semi-colon (;), equals-to (=), comma (,) and plus (+)
  57. //              Full stop (.) may only be used for extender speration
  58. //        VFAT :
  59. //        HPFS :
  60. //        NTFS : 
  61. //    The infix _W_ means that wild characters are allowed and thus not invalid chars
  62. //  The NULL-character cannot be checked using string functions and is therefore
  63. //  removed from the invalid chars
  64. #ifdef WIN32
  65. #define INVALID_W_PATH_CHARS    "\x01\x02\x03\x04\x05\x06\x07\x08\x09"        \
  66.                                 "\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13"    \
  67.                                 "\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D"    \
  68.                                 "\x1E\x1F"                                    \
  69.                                 "<>\"|"
  70. #else
  71. // ... WIN16 has much less valid chars
  72. #define INVALID_W_PATH_CHARS    "\x01\x02\x03\x04\x05\x06\x07\x08\x09"        \
  73.                                 "\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13"    \
  74.                                 "\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D"    \
  75.                                 "\x1E\x1F"                                    \
  76.                                 "<>\"|"                                        \
  77.                                 " +,;=[]`"                                    \
  78.                                 "\x7F"                                        \
  79.                                 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x80" \
  80.                                 "\x8A\x8B\x8C\x8D\x8E\x8F"                       \
  81.                                 "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x90" \
  82.                                 "\x9A\x9B\x9C\x9D\x9E\x9F"                       \
  83.                                 "\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xA0" \
  84.                                 "\xAA\xAB\xAC\xAD\xAE\xAF"                       \
  85.                                 "\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xB0" \
  86.                                 "\xBA\xBB\xBC\xBD\xBE\xBF"                       \
  87.                                 "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xC0" \
  88.                                 "\xCA\xCB\xCC\xCD\xCE\xCF"                       \
  89.                                 "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xD0" \
  90.                                 "\xDA\xDB\xDC\xDD\xDE\xDF"                       \
  91.                                 "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xE0" \
  92.                                 "\xEA\xEB\xEC\xED\xEE\xEF"                       \
  93.                                 "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xF0" \
  94.                                 "\xFA\xFB\xFC\xFD\xFE\xFF"                       
  95.  
  96. #endif
  97.  
  98. #define INVALID_W_DIR_CHARS        INVALID_W_PATH_CHARS ":"
  99. #define INVALID_W_FILE_CHARS    INVALID_W_DIR_CHARS     "/\\"
  100.  
  101. #define INVALID_PATH_CHARS        INVALID_W_PATH_CHARS "?*"
  102. #define INVALID_DIR_CHARS        INVALID_W_DIR_CHARS     "?*"
  103. #define INVALID_FILE_CHARS        INVALID_W_FILE_CHARS "?*"
  104.  
  105. #endif // __FILELMT_H__             
  106.